package com.axisdesign.client;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.SimplePanel;

public class ContentFrame extends Composite{
	final int subContentCount=3;
	SimplePanel mainPanel;
	MainContentPanel mainContentPanel;
	SubContentPanel subContentPanel[];
	
	public ContentFrame() {
		mainPanel = new SimplePanel();
		mainContentPanel = new MainContentPanel();
		
		
		mainPanel.setStyleName("contentFrame");
		subContentPanel = new SubContentPanel[subContentCount];
		
		
		init();
		initWidget(mainPanel);
	}
	
	private void init() {
		queue(-1);
	}
	
	public void queue(int type) {
		mainPanel.clear();
		
		if(type==0) {
			subContentPanel[type] = new SubContentPanel("0",0,0);
			mainPanel.add(subContentPanel[type]);
		}
		else if(type==1) {
			subContentPanel[type] = new SubContentPanel("1",0,0);
			mainPanel.add(subContentPanel[type]);
			
		}
		else if(type==2) {
			subContentPanel[type] = new SubContentPanel("2",0,0);
			mainPanel.add(subContentPanel[type]);
		}
		else {
			mainPanel.add(mainContentPanel);
		}
	}
}
